problem 8

Write a JavaScript program that prompts the user to enter their age and checks if they are eligible to vote. Use comparison operators to compare the age with the legal voting age in your country. Display a message indicating whether they are eligible or not. Add comments to explain the code logic.